/**
  * 750设计稿情况下1px在手机上展示0.5
  */
.one-px(@direction: bottom, @color: #eee) {
  position: relative;
  &::after {
    content: "";
    display: block;
    background-color: @color;
    transform: scaleY(0.5);
    @{direction}: 0;
    position: absolute;
    & when (@direction = top),  (@direction = bottom) {
      height: 1px;
      right: 0;
      left: 0;
      transform: scaleY(0.5);
    }

    & when (@direction = right), (@direction = left) {
      width: 1px;
      bottom: 0;
      top: 0;
      transform: scaleX(0.5);
    }
  }
}
